package com.bwie.parkdemo.mvvm.model;

import com.bwie.lib_core.base.BaseEntity;
import com.bwie.lib_core.mvvm.base.BaseModel;
import com.bwie.lib_core.network.HttpRetrofitFactory;
import com.bwie.lib_core.network.HttpType;
import com.bwie.parkdemo.mvvm.model.entity.PatrolesEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;

/**
 * 全部巡逻路线model
 * */
public class PatrolesModel extends BaseModel{
    @Override
    public Observable<BaseEntity> request(RequestBody... bodyes) {
        Observable<PatrolesEntity>source = HttpRetrofitFactory.getInstance().factory(HttpType.TOKENINTERFACE)
                .getRetrofit().create(Api.class).requestPatroles();
        return changeOB(source);
    }

    @Override
    public void cleared() {

    }
}
